﻿using System;
using System.Windows;
using System.Collections.Generic;
using System.Windows.Media;
using System.Device;
using System.Device.Location;
using Microsoft.Phone.Controls.Maps;
namespace GlobalRadar
{
    public static class MapPolylineEx
    {
        public static void DrawLine(this MapPolyline obj, GeoCoordinate PosistionBegin, GeoCoordinate PositionEnd)
        {
            obj.Locations = new LocationCollection();
            obj.Locations.Add(PosistionBegin);
            obj.Locations.Add(PositionEnd);
        }
        public static void DrawLine(this MapPolyline obj, LocationCollection ListPosition)
        {
            obj.Locations = new LocationCollection();
            obj.Locations = ListPosition;
        }
        public static void DrawLine(this MapPolyline obj, GeoCoordinate PosistionBegin, GeoCoordinate PositionEnd, SolidColorBrush Brush)
        {
            obj.Locations = new LocationCollection();
            obj.Stroke = Brush;
            obj.Locations.Add(PosistionBegin);
            obj.Locations.Add(PositionEnd);
        }
        public static void DrawLine(this MapPolyline obj, GeoCoordinate PosistionBegin, GeoCoordinate PositionEnd, int Thickness, SolidColorBrush Brush)
        {
            obj.Locations = new LocationCollection();
            obj.Stroke = Brush;
            obj.StrokeThickness = Thickness;
            obj.Locations.Add(PosistionBegin);
            obj.Locations.Add(PositionEnd);
        }
    }
}
